from tortoise import Model
from tortoise import fields

class User(Model):
     id = fields.IntField(pk=True)
     nick_name = fields.CharField(max_length=50,description="用户名")

class UserInfo(Model):
     id = fields.IntField(pk=True)
     user_id = fields.IntField(description="用户id")
     real_name = fields.CharField(max_length=32, description="真实姓名")
     sex = fields.CharField(max_length=2,description="性别")
     age = fields.IntField(max=100, min=0, description="年龄")
     birthday = fields.DateField(description="生日")
     idcard = fields.CharField(max_length=18, description="身份证")
     region = fields.CharField(max_length=255, description="地区")
     province = fields.IntField(description="省")
     city = fields.IntField(description="市")
     area = fields.IntField(description="区")
     phone = fields.CharField(max_length=14, description="手机号")
     balance = fields.IntField(description="余额")
     appid = fields.CharField(max_length=20, description="appid")